package com.hc.wego.bean;

import com.hc.wego.constant.WeGoConstant;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 *
 * @author hc
 * @date 2025-06-19 16:38
 */
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class BaseQuery {
    /**
     * 要查询的字段
     */
    @Getter
    private List<String> columns;
    /**
     * 页码
     */
    private Long pageNum;
    /**
     * 页面大小
     */
    private Long pageSize;

    public Long getPageNum() {
        return pageNum == null ? 1 : pageNum;
    }

    public Long getPageSize() {
        return pageSize == null ? WeGoConstant.PAGE_SIZE : pageSize;
    }
}